package java_thinking.unit_13._13_6;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @Description : Matcher.find()方法
 * @author: cww
 * @DateTime: 2019-03-25 22:53
 */

public class Finding {
    public static void main(String[] args) {
        Matcher matcher = Pattern.compile("\\w+").matcher("Evening is full of| the linnet'ss wings");
        while (matcher.find()){
            System.out.println(matcher.group());
        }
        System.out.println("======");
        int i = 10;
        while (matcher.find(i)){
            System.out.print(matcher.group()+" ");
            i++;
        }
    }
}
